<?php
	
?>
<div class="formList goc5" style="border: 1px solid #efefef;">
	<div class="appTop goct5">
		<div class="block_filter">
			<div class="fl">
				<div class="listSearch">
					<span class="title">Lịch học đã chọn</span>
					<div class="clr"></div>			
				</div>
			</div>
			<div class="clr"></div>
		</div>
	</div>
	<div class="appBody">
		<table class="tblList">
			<tr>
				<th width="20">#</th>
				<th width="80">Buổi</th>
				<th width="100">Thời gian</th>
				<th width="80">Thứ</th>
				<th width="120">Phòng học</th>
				<th>Địa điểm</th>
				<th width="70">Control</th>
			</tr>
			<?php
			foreach ($this->Items as $key => $val){ 
				$id 			= $val['id'];
				$thu			= $val['thu'];
				$gio_tu			= $val['gio_tu'];
				$phut_tu		= $val['phut_tu'];
				$gio_den		= $val['gio_den'];
				$phut_den		= $val['phut_den'];
				$phonghoc_name	= $val['phonghoc_name'];
				$diadiemhoc_name= $val['diadiemhoc_name'];
				$order 			= $this->formText('order[' . $val['id'] . ']', $val['order'], array('style'=>'width: 30px; text-align: center;'));
				$status 		= $val['status'];
				
				$buoi   = 'Sáng';
				if(($val['gio_tu'] >= 12) && ($val['gio_tu'] < 18)){
					$buoi = 'Chiều';
				}
				if($val['gio_tu'] >= 18){
					$buoi = 'Tối';
				}
					
				$cid 			= $this->formCheckbox('cid[]',$val['id']);
				$classRow = 'row1';
				if($key % 2 == 0)
					$classRow = '';
			?>
			<tr class="<?php echo $classRow;?>" id="danhsach_<?php echo $id;?>">
				<td align="center"><?php echo $key + 1;?></td>
				<td align="center" id="buoi">
					<?php echo $buoi;?>
					<input type="hidden" name="id_lichhoc[]" value="<?php echo $id;?>">
				</td>
				<td align="right" id="thoigian">
					<?php echo $gio_tu . 'h' . $phut_tu . ' - ' . $gio_den . 'h' . $phut_den;?>
				</td>
				<td align="right" id="thu"><?php echo $thu;?></td>
				<td align="center" id="phonghoc"><?php echo $phonghoc_name;?></td>
				<td align="left" id="diadiem"><?php echo $diadiemhoc_name;?></td>
				<td align="center"><a href="javascript:void(0)" onclick="xoaLichhoc(<?php echo $id;?>)">Xóa</a></td>
			</tr>
			<?php
			} 
			?>
		</table>
	</div>
</div>